<extend name="Public/base" />
<block name="head">
</block>
<block name="body">
<div class="m-tab s-tab">
	<h2 class="u-tt">文章栏目</h2>
	<ul class="u-tabs">
		<li><a href="{:U('index')}">栏目列表</a></li>
		<li><a href="#tab1" class="tab-on tab-a">{$actionName}文章栏目</a></li>
	</ul>
</div>
<php></php>
<div class="m-form">
	<form name="" action="{:U($action)}" method="post" id="form">
		<fieldset>
			<div id="tab1">
				<div class="formitm">
					<label class="lab">上级栏目：</label>
					<div class="ipt">
						<select class="u-slt" name="pid" id="pid"  datatype="*">
							<option value="0">=====顶级栏目=====</option>
							<volist name="category" id="vo">
							<option value="{$vo.cid}" <if condition="$info['pid']==$vo['cid']">selected="selected"</if>>{$vo.title_show}</option>
							</volist>
						</select>
						<p></p>
					</div>
				</div>
				<div class="formitm">
					<label class="lab">栏目名称：</label>
					<div class="ipt">
						<input name="title" type="text" class="u-ipt u-ipt-6" id="title" value="{$info.title}" datatype="*" errormsg="栏目名称至少1~20个字符！" placeholder="栏目名称"/>
						<p></p>
					</div>
				</div>
				<div class="formitm">
					<label class="lab">栏目别名：</label>
					<div class="ipt">
						<input name="ename" type="text" class="u-ipt u-ipt-6" id="ename" value="{$info.ename}" placeholder="栏目别名"/>
						<p></p>
					</div>
				</div>
				<div class="formitm">
					<label class="lab">栏目模型：</label>
					<div class="ipt">
						<select class="u-slt" name="type" id="type"  datatype="*">
							<?php if(!isset($info['type'])){ $info['type']=1; } ?>
							<option value="1" <if condition="$info['type']==1">selected="selected"</if>>单页</option>
							<option value="0" <if condition="$info['type']==0">selected="selected"</if>>列表</option>
							</option>
						</select>
						<p></p>
					</div>
				</div>
				<div class="formitm">
					<label class="lab">栏目状态：</label>
					<div class="ipt">
						<?php if(!isset($info['status'])){ $info['status']=1; } ?>
						<label class="u-opt"><input name="status" type="radio" value="1" <if condition="$info['status']==1"> checked="checked" </if> />启用</label>
						<label class="u-opt"><input name="status" type="radio" value="0" <if condition="$info['status']==0"> checked="checked" </if> />禁用</label>
						<p></p>
					</div>
				</div>
				<div class="formitm">
					<label class="lab">栏目顺序：</label>
					<div class="ipt">
						<input name="sort" type="text" class="u-ipt u-ipt-2" value="{$info.sort|default='1'}" placeholder="数字越小栏目越靠前" datatype="n" errormsg="只能为整数"/>
						<p>数字越小栏目越靠前</p>
					</div>
				</div>
				<div id="form_cont">{// 单页内容 }
				<div class="formitm">
					<label class="lab">内容：</label>
					<div class="ipt">
						<textarea name="content" id="content" class="u-editor" style="width:100%;height:300px;visibility:hidden;">{$info.content}</textarea>
					</div>
				</div>	
				</div>{// END 单页内容 }
				<div class="formitm">
					<label class="lab" >关键词：</label>
					<div class="ipt">
						<input name="keywords" type="text" class="u-ipt u-ipt-6" id="keywords" value="{$info.keywords}" maxlength="250" placeholder="关键字"/>
					</div>
				</div>
				<div class="formitm">
					<label class="lab" >描述：</label>
					<div class="ipt">
						<textarea name="description" id="description" class="u-tta u-tta-6" placeholder="栏目描述">{$info.description}</textarea>
					</div>
				</div>
			</div>
			<div class="formitm formitm-1  formitm-2">
				<input name="cid" type="hidden" value="{$info.cid|default=''}" />
				<button class="u-btn" type="submit">保存</button>
				<button class="u-btn s-btn-c3" type="reset">重置</button>
				<span class="status" id="status"></span>
			</div>
		</fieldset>
	</form>
</div>
</block>
<block name="script">
<script>
Do.ready('base','form','dialog','color','editor','sort','upload','tabs',function() {
	//表单综合处理
	$('#form').duxFormPage({
		returnUrl:"{:U('index')}"
	});
	function catType() {

	}
});
</script>
</block>